{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 上周回顾\n",
    "\n",
    "> * 1.list的一般方法/函数的使用案例，如：\n",
    ">> 1. append() 增加，增加list元素到list末尾，常用于新建列表\n",
    ">> 2. pop(index)/remove(values)对比两者优势\n",
    ">> 3. count() 查看某个元素出现的次数\n",
    ">> 4. index() 查看某个元素第一次出现的位置\n",
    ">> 5. extend() 两个list合并在一起，可以用[]+[]来实现\n",
    ">> 6. sort() list元素的排序\n",
    "\n",
    "> * 2.list的高级用法，如：\n",
    ">> 1. copy() list(可变的数据类)复制，不等同于赋值，可以用[:]来实现\n",
    ">> 2. enumerate() 枚举，可以同时遍历获取index和values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "i\n",
      "i\n",
      "a\n"
     ]
    }
   ],
   "source": [
    "vowels = ['a','e','i','o','u']\n",
    "word = \"Milliways\"\n",
    "# 检查  word中出现的元音，并打印出来 怎么做？\n",
    "# for letter in word：  # 第一个元素letter 请不要和已有变量重名\n",
    "                      # 第一个元素一般不定义名字，常用item（元素）来命名\n",
    "                      #                           简写 i 来命名\n",
    "                      # 第二个元素word (重要)， 意味着遍历的内容\n",
    "                      # 遍历的内容一般是 序列数据 str list\n",
    "for letter in word:\n",
    "     # print(letter)\n",
    "    if letter in vowels:\n",
    "         print(letter)\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "ename": "IndentationError",
     "evalue": "unexpected indent (<ipython-input-5-f8bcfea8c857>, line 2)",
     "output_type": "error",
     "traceback": [
      "\u001b[1;36m  File \u001b[1;32m\"<ipython-input-5-f8bcfea8c857>\"\u001b[1;36m, line \u001b[1;32m2\u001b[0m\n\u001b[1;33m    found = []\u001b[0m\n\u001b[1;37m    ^\u001b[0m\n\u001b[1;31mIndentationError\u001b[0m\u001b[1;31m:\u001b[0m unexpected indent\n"
     ]
    }
   ],
   "source": [
    "# 使用append（）新建列表\n",
    "found = []\n",
    "for letter in word:\n",
    "     print(letter)\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
